#include #include #include using namespace std; void main() { //while(true) //{ // cout << time(NULL) << endl; //} //function - a reuseable set of logic that has been encapsulated and has a name //argument - a variable that a function uses to find its answer //random number generator - "machine"/ program that gives you random numbers srand((unsigned int)time(NULL)); //seed random number generator //type-cast - tells the compiler to treat a varible as another datatype while(true) { int dieOne = rand() % 6 + 1; int dieTwo = rand() % 6 + 1; int dieTotal = dieOne + dieTwo; cout << dieTotal << endl; } }